!function(){"use strict";var e={n:function(t){var a=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(a,{a:a}),a},d:function(t,a){for(var n in a)e.o(a,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:a[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t);var a=window.jQuery,n=e.n(a);const i=()=>{const e=window.innerWidth||document.documentElement.clientWidth,t=window?.diviBreakpointData?.enabledBreakpoints??[{enable:!0,order:50,name:"desktop",baseDevice:!0,label:"Desktop"},{enable:!0,maxWidth:{value:"980px",default:980},order:30,name:"tablet",label:"Tablet"},{enable:!0,maxWidth:{value:"767px",default:767},order:10,name:"phone",label:"Phone"}],a=t.find((e=>e?.baseDevice))?.name??"desktop";let n,i=null,o=null;return t.forEach((t=>{if(t?.baseDevice)return;const a=t?.maxWidth?.value,s=t?.minWidth?.value;if(a&&s&&parseInt(a)>=e&&parseInt(s)<=e&&(n=t?.name),a&&!s){const o=parseInt(a);o>=e&&(null===i||oo)&&(n=t?.name,o=a)}})),n??a},o=()=>"ontouchstart"in window&&"function"==typeof window.ontouchstart||(navigator?.maxTouchPoints??0)>0,s=(e,t,a,n)=>{const i=e=>{if(o())return void t.removeEventListener("mouseenter",i);const s=e=>{o()?t.removeEventListener("mouseleave",s):(t.addEventListener("mouseenter",i,{once:!0}),a(e))};t.addEventListener("mouseleave",s,{once:!0}),n(e)},s=e=>{t.addEventListener("touchstart",(e=>{t.addEventListener("touchstart",s,{once:!0});const n=e.target;n.matches("a")||n.closest("a")||(a(e),t.classList.remove("et_multi_view__hovered"))}),{once:!0});const i=e.target;if(i.matches("a")||i.closest("a"))return;const o=document.querySelector(".et_multi_view__hovered");o&&o!==t&&o.dispatchEvent(new Event("touchstart")),n(e),t.classList.add("et_multi_view__hovered")};o()?(t.removeEventListener("touchstart",s),t.addEventListener("touchstart",s,{once:!0})):(t.removeEventListener("mouseenter",i),t.addEventListener("mouseenter",i,{once:!0}))},r=e=>{window.dispatchEvent(new CustomEvent(`divi:multiView:${e.item.action}`,{detail:e}))},l=({data:e,breakpoint:t,baseBreakpoint:a="desktop",breakpointNames:n=["desktop","tablet","phone"]})=>{let i=null,o=null,s=null;const r=n.indexOf(t),l=n.indexOf(a),d=r{const a=e?.[t];void 0!==a&&null===i&&(i=a);const n=e?.[`${t}--hover`];void 0!==n&&null===o&&(o=n);const r=e?.[`${t}--sticky`];void 0!==r&&null===s&&(s=r)})),{defaultStateData:i,hoverStateData:o,stickyStateData:s}},d=({stateData:e,item:t,element:a,breakpoint:n,state:i,originalEvent:o})=>{const s={};let l=!1;Object.keys(e).forEach((t=>{const n=a.getAttribute(t)??"",i=e[t];i!==n&&("src"===t&&a instanceof HTMLImageElement&&((e,t)=>{e?(t.classList.remove("et_multi_view_hidden_image"),t.classList.add("et_multi_view_image__loading"),t.classList.remove("et_multi_view_image__loaded"),t.addEventListener("load",(()=>{t.classList.remove("et_multi_view_image__loading"),t.classList.add("et_multi_view_image__loaded")}),{once:!0})):t.classList.add("et_multi_view_hidden_image")})(i,a),"href"===t&&a instanceof HTMLAnchorElement&&a.classList.contains("et_pb_lightbox_image--open")&&(e=>{const t=document.querySelector("img.mfp-img");t&&(t.src=e)})(i),a.setAttribute(t,i),l=!0,s[t]=i)})),l&&r({breakpoint:n,item:t,originalEvent:o,state:i,updatedData:s})},m=({stateData:e,item:t,element:a,breakpoint:n,state:i,originalEvent:o})=>{let s,l=!1;e?.add?.forEach((e=>{a.classList.contains(e)||(a.classList.add(e),l=!0,s={...s,add:[...s?.add??[]].concat(e)})})),e?.remove?.forEach((e=>{a.classList.contains(e)&&(a.classList.remove(e),l=!0,s={...s,remove:[...s?.remove??[]].concat(e)})})),l&&r({breakpoint:n,item:t,originalEvent:o,state:i,updatedData:s})},c=({stateData:e,item:t,element:a,breakpoint:n,state:i,originalEvent:o})=>{let s,l=!1;a.innerHTML!==e&&(((e,t)=>{""===e?t.classList.add("et_multi_view_hidden"):t.classList.contains("et_multi_view_hidden")&&t.classList.remove("et_multi_view_hidden")})(e,a),a.innerHTML=e,l=!0,s=e),l&&r({breakpoint:n,item:t,originalEvent:o,state:i,updatedData:s})},u=({stateData:e,item:t,element:a,breakpoint:n,state:i,originalEvent:o})=>{const s={};let l=!1;Object.keys(e).forEach((t=>{const n=a.style.getPropertyValue(t)??"",i=e[t];n!==i&&(a.style.setProperty(t,i),l=!0,s[t]=i)})),l&&r({breakpoint:n,item:t,originalEvent:o,state:i,updatedData:s})},p=({stateData:e,item:t,element:a,breakpoint:n,state:i,originalEvent:o})=>{let s,l=!1;"hidden"!==e||a.classList.contains("et_multi_view_hidden")||(a.classList.add("et_multi_view_hidden"),l=!0,s=e),"visible"===e&&a.classList.contains("et_multi_view_hidden")&&(a.classList.remove("et_multi_view_hidden"),l=!0,s=e),l&&r({breakpoint:n,item:t,originalEvent:o,state:i,updatedData:s})},v=({items:e,breakpoint:t,isInit:a=!1,baseBreakpoint:n,breakpointNames:i=["desktop","tablet","phone"]})=>{e.forEach((e=>{const{action:o,data:r,moduleId:v,moduleName:b,selector:k,hoverSelector:h,switchOnLoad:E}=e,f=document.querySelectorAll(k);switch(o){case"setAttrs":f.forEach((e=>{(({item:e,breakpoint:t,isInit:a=!1,baseBreakpoint:n="desktop",breakpointNames:i=["desktop","tablet","phone"]})=>{const{element:o,hoverElements:r,data:m}=e,{defaultStateData:c,hoverStateData:u}=l({data:m,breakpoint:t,baseBreakpoint:n,breakpointNames:i});if(null===c)return;const p=a=>{d({stateData:c,state:"default",element:o,item:e,breakpoint:t,originalEvent:a})};if(null!==u){const a=a=>{d({stateData:u,state:"hover",element:o,item:e,breakpoint:t,originalEvent:a})};r.forEach((e=>{s(0,e,p,a)}))}"desktop"===t&&a&&!e.switchOnLoad||p()})({item:{action:o,data:r,moduleId:v,moduleName:b,element:e,hoverElements:h?document.querySelectorAll(h):[e],switchOnLoad:E},breakpoint:t,isInit:a,baseBreakpoint:n,breakpointNames:i})}));break;case"setClassName":f.forEach((e=>{(({item:e,breakpoint:t,isInit:a=!1,baseBreakpoint:n="desktop",breakpointNames:i=["desktop","tablet","phone"]})=>{const{element:o,hoverElements:r,data:d}=e,{defaultStateData:c,hoverStateData:u}=l({data:d,breakpoint:t,baseBreakpoint:n,breakpointNames:i});if(null===c)return;const p=a=>{m({stateData:c,state:"default",element:o,item:e,breakpoint:t,originalEvent:a})};if(null!==u){const a=a=>{m({stateData:u,state:"hover",element:o,item:e,breakpoint:t,originalEvent:a})};r.forEach((e=>{s(0,e,p,a)}))}"desktop"===t&&a&&!e.switchOnLoad||p()})({item:{action:o,data:r,moduleId:v,moduleName:b,element:e,hoverElements:h?document.querySelectorAll(h):[e],switchOnLoad:E},breakpoint:t,isInit:a,baseBreakpoint:n,breakpointNames:i})}));break;case"setContent":f.forEach((e=>{(({item:e,breakpoint:t,isInit:a=!1,baseBreakpoint:n="desktop",breakpointNames:i=["desktop","tablet","phone"]})=>{const{element:o,hoverElements:r,data:d}=e,{defaultStateData:m,hoverStateData:u}=l({data:d,breakpoint:t,baseBreakpoint:n,breakpointNames:i});if(null===m)return;const p=a=>{c({stateData:m,state:"default",element:o,item:e,breakpoint:t,originalEvent:a})};if(null!==u){const a=a=>{c({stateData:u,state:"hover",element:o,item:e,breakpoint:t,originalEvent:a})};r.forEach((e=>{s(0,e,p,a)}))}"desktop"===t&&a&&!e.switchOnLoad||p()})({item:{action:o,data:r,moduleId:v,moduleName:b,element:e,hoverElements:h?document.querySelectorAll(h):[e],switchOnLoad:E},breakpoint:t,isInit:a,baseBreakpoint:n,breakpointNames:i})}));break;case"setStyle":f.forEach((e=>{(({item:e,breakpoint:t,isInit:a=!1,baseBreakpoint:n="desktop",breakpointNames:i=["desktop","tablet","phone"]})=>{const{element:o,hoverElements:r,data:d}=e,{defaultStateData:m,hoverStateData:c}=l({data:d,breakpoint:t,baseBreakpoint:n,breakpointNames:i});if(null===m)return;const p=a=>{u({stateData:m,state:"default",element:o,item:e,breakpoint:t,originalEvent:a})};if(null!==c){const a=a=>{u({stateData:c,state:"hover",element:o,item:e,breakpoint:t,originalEvent:a})};r.forEach((e=>{s(0,e,p,a)}))}"desktop"===t&&a&&!e.switchOnLoad||p()})({item:{action:o,data:r,moduleId:v,moduleName:b,element:e,hoverElements:h?document.querySelectorAll(h):[e],switchOnLoad:E},breakpoint:t,isInit:a,baseBreakpoint:n,breakpointNames:i})}));break;case"setVisibility":f.forEach((e=>{(({item:e,breakpoint:t,isInit:a=!1,baseBreakpoint:n="desktop",breakpointNames:i=["desktop","tablet","phone"]})=>{const{element:o,hoverElements:r,data:d}=e,{defaultStateData:m,hoverStateData:c}=l({data:d,breakpoint:t,baseBreakpoint:n,breakpointNames:i});if(null===m)return;const u=a=>{p({stateData:m,state:"default",element:o,item:e,breakpoint:t,originalEvent:a})};if(null!==c){const a=a=>{p({stateData:c,state:"hover",element:o,item:e,breakpoint:t,originalEvent:a})};r.forEach((e=>{s(0,e,u,a)}))}"desktop"===t&&a&&!e.switchOnLoad||u()})({item:{action:o,data:r,moduleId:v,moduleName:b,element:e,hoverElements:h?document.querySelectorAll(h):[e],switchOnLoad:E},breakpoint:t,isInit:a,baseBreakpoint:n,breakpointNames:i})}))}}))},b=(e,t=!1)=>{const a=window?.diviElementMultiViewData??[];if(!Array.isArray(a)||!a.length)return;const n={};a.forEach((e=>{Object.prototype.hasOwnProperty.call(n,e.moduleId)?n[e.moduleId]={moduleName:e.moduleName,actions:n[e.moduleId].actions.concat(e)}:n[e.moduleId]={moduleName:e.moduleName,actions:[e]}}));const i=window?.diviBreakpointData?.baseBreakpointName??"desktop",o=window?.diviBreakpointData?.enabledBreakpointNames??["desktop","tablet","phone"];Object.keys(n).forEach((a=>{const{actions:s}=n[a];v({items:s,breakpoint:e,isInit:t,baseBreakpoint:i,breakpointNames:o})}))};(()=>{let e,t=!1;const a=()=>{e&&clearTimeout(e),e=setTimeout((()=>{const e=i();t?b(e,!1):(b(e,!0),document.querySelectorAll("[data-et-multi-view-load-tablet-hidden]").forEach((e=>{e.removeAttribute("data-et-multi-view-load-tablet-hidden")})),document.querySelectorAll("[data-et-multi-view-load-phone-hidden]").forEach((e=>{e.removeAttribute("data-et-multi-view-load-phone-hidden")})),t=!0)}),400)};document.addEventListener("DOMContentLoaded",(()=>{window?.screen?.orientation?window.screen.orientation.addEventListener("change",a):window.addEventListener("orientationchange",a),window.addEventListener("resize",a),window.addEventListener("divi:setPaginatedContent",a),n()(document).on("et_pb_after_init_modules",a)}))})(),((window.divi=window.divi||{}).scriptLibrary=window.divi.scriptLibrary||{}).scriptLibraryMultiView=t}();